(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{115:function(e,t,n){"use strict";var o=n(116);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var s=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,r=n.alignWithTop,a=n.alignWithLeft,u=n.offsetTop||0,c=n.offsetLeft||0,l=n.offsetBottom||0,p=n.offsetRight||0;s=void 0===s||s;var d=o.isWindow(t),h=o.offset(e),f=o.outerHeight(e),g=o.outerWidth(e),m=void 0,v=void 0,b=void 0,k=void 0,y=void 0,w=void 0,T=void 0,S=void 0,O=void 0,I=void 0;d?(T=t,I=o.height(T),O=o.width(T),S={left:o.scrollLeft(T),top:o.scrollTop(T)},y={left:h.left-S.left-c,top:h.top-S.top-u},w={left:h.left+g-(S.left+O)+p,top:h.top+f-(S.top+I)+l},k=S):(m=o.offset(t),v=t.clientHeight,b=t.clientWidth,k={left:t.scrollLeft,top:t.scrollTop},y={left:h.left-(m.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:h.top-(m.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-u},w={left:h.left+g-(m.left+b+(parseFloat(o.css(t,"borderRightWidth"))||0))+p,top:h.top+f-(m.top+v+(parseFloat(o.css(t,"borderBottomWidth"))||0))+l}),y.top<0||w.top>0?!0===r?o.scrollTop(t,k.top+y.top):!1===r?o.scrollTop(t,k.top+w.top):y.top<0?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+w.top):i||((r=void 0===r||!!r)?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+w.top)),s&&(y.left<0||w.left>0?!0===a?o.scrollLeft(t,k.left+y.left):!1===a?o.scrollLeft(t,k.left+w.left):y.left<0?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+w.left):i||((a=void 0===a||!!a)?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+w.left)))}},116:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function i(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var s=e.document;"number"!=typeof(n=s.documentElement[o])&&(n=s.body[o])}return n}function r(e){return i(e)}function a(e){return i(e,!0)}function u(e){var t=function(e){var t,n=void 0,o=void 0,s=e.ownerDocument,i=s.body,r=s&&s.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=r.clientLeft||i.clientLeft||0,top:o-=r.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=a(o),t}var c=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,p="currentStyle",d="runtimeStyle",h="left",f=void 0;function g(e,t){for(var n=0;n<e.length;n++)t(e[n])}function m(e){return"border-box"===f(e,"boxSizing")}"undefined"!=typeof window&&(f=window.getComputedStyle?function(e,t,n){var o="",s=e.ownerDocument,i=n||s.defaultView.getComputedStyle(e,null);return i&&(o=i.getPropertyValue(t)||i[t]),o}:function(e,t){var n=e[p]&&e[p][t];if(c.test(n)&&!l.test(t)){var o=e.style,s=o[h],i=e[d][h];e[d][h]=e[p][h],o[h]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[h]=s,e[d][h]=i}return""===n?"auto":n});var v=["margin","border","padding"],b=-1,k=2,y=1;function w(e,t,n){var o=0,s=void 0,i=void 0,r=void 0;for(i=0;i<t.length;i++)if(s=t[i])for(r=0;r<n.length;r++){var a;a="border"===s?s+n[r]+"Width":s+n[r],o+=parseFloat(f(e,a))||0}return o}function T(e){return null!=e&&e==e.window}var S={};function O(e,t,n){if(T(e))return"width"===t?S.viewportWidth(e):S.viewportHeight(e);if(9===e.nodeType)return"width"===t?S.docWidth(e):S.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],s="width"===t?e.offsetWidth:e.offsetHeight,i=(f(e),m(e)),r=0;(null==s||s<=0)&&(s=void 0,(null==(r=f(e,t))||Number(r)<0)&&(r=e.style[t]||0),r=parseFloat(r)||0),void 0===n&&(n=i?y:b);var a=void 0!==s||i,u=s||r;if(n===b)return a?u-w(e,["border","padding"],o):r;if(a){var c=n===k?-w(e,["border"],o):w(e,["margin"],o);return u+(n===y?0:c)}return r+w(e,v.slice(n),o)}g(["Width","Height"],(function(e){S["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],S["viewport"+e](n))},S["viewport"+e]=function(t){var n="client"+e,o=t.document,s=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||s&&s[n]||i}}));var I={position:"absolute",visibility:"hidden",display:"block"};function x(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=O.apply(void 0,n):function(e,o,s){var i={},r=e.style,a=void 0;for(a in o)o.hasOwnProperty(a)&&(i[a]=r[a],r[a]=o[a]);for(a in function(){t=O.apply(void 0,n)}.call(e),o)o.hasOwnProperty(a)&&(r[a]=i[a])}(e,I),t}function E(e,t,n){var o=n;if("object"!==(void 0===t?"undefined":s(t)))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):f(e,t);for(var i in t)t.hasOwnProperty(i)&&E(e,i,t[i])}g(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);S["outer"+t]=function(t,n){return t&&x(t,e,n?0:y)};var n="width"===e?["Left","Right"]:["Top","Bottom"];S[e]=function(t,o){return void 0===o?t&&x(t,e,b):t?(f(t),m(t)&&(o+=w(t,["padding","border"],n)),E(t,e,o)):void 0}})),e.exports=o({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return u(e);!function(e,t){"static"===E(e,"position")&&(e.style.position="relative");var n=u(e),o={},s=void 0,i=void 0;for(i in t)t.hasOwnProperty(i)&&(s=parseFloat(E(e,i))||0,o[i]=s+t[i]-n[i]);E(e,o)}(e,t)},isWindow:T,each:g,css:E,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(T(e)){if(void 0===t)return r(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(T(e)){if(void 0===t)return a(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},S)},127:function(e,t,n){"use strict";var o=n(0),s=n(7),i=n(4),r=n.n(i),a=n(1),u=n(11),c=n(24),l=n(14),p=n.n(l),d=n(149),h=n(57),f=n(36);function g({value:e,status:t,title:n,displayTransform:i,isBorderless:c=!1,disabled:l=!1,onClickRemove:p=s.noop,onMouseEnter:m,onMouseLeave:v,messages:b,termPosition:k,termsCount:y}){const w=Object(u.useInstanceId)(g),T=r()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":c,"is-disabled":l}),S=i(e),O=Object(a.sprintf)(
/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
Object(a.__)("%1$s (%2$s of %3$s)"),S,k,y);return Object(o.createElement)("span",{className:T,onMouseEnter:m,onMouseLeave:v,title:n},Object(o.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${w}`},Object(o.createElement)(f.a,{as:"span"},O),Object(o.createElement)("span",{"aria-hidden":"true"},S)),Object(o.createElement)(h.a,{className:"components-form-token-field__remove-token",icon:d.a,onClick:!l&&(()=>p({value:e})),label:b.remove,"aria-describedby":`components-form-token-field__token-text-${w}`}))}var m=n(81),v=n(82),b=n(8),k=n(25),y=Object(u.createHigherOrderComponent)((e=>t=>Object(o.createElement)(e,Object(b.a)({},t,{speak:k.speak,debouncedSpeak:Object(u.useDebounce)(k.speak,500)}))),"withSpokenMessages");const w={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class T extends o.Component{constructor(){super(...arguments),this.state=w,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:n}=this.props,o=!p()(t,e.suggestions);(o||n!==e.value)&&this.updateSuggestions(o)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(w)}onKeyDown(e){let t=!1;switch(e.keyCode){case c.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case c.ENTER:t=this.addCurrentToken();break;case c.LEFT:t=this.handleLeftArrowKey();break;case c.UP:t=this.handleUpArrowKey();break;case c.RIGHT:t=this.handleRightArrowKey();break;case c.DOWN:t=this.handleDownArrowKey();break;case c.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case c.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case c.ESCAPE:t=this.handleEscapeKey(e),e.stopPropagation()}t&&e.preventDefault()}onKeyPress(e){let t=!1;44===e.charCode&&(t=this.handleCommaKey()),t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,n=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,o=t.split(n),i=Object(s.last)(o)||"";o.length>1&&this.addNewTokens(o.slice(0,-1)),this.setState({incompleteTokenValue:i},this.updateSuggestions),this.props.onInputChange(i)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0}))),!0}handleDownArrowKey(){return this.setState(((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0}))),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState(((t,n)=>({inputOffsetFromEnd:n.value.length-Math.max(e,-1)-1})))}moveInputBeforePreviousToken(){this.setState(((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)})))}moveInputAfterNextToken(){this.setState((e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)})))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e<this.props.value.length&&(this.deleteToken(this.props.value[e]),this.moveInputToIndex(e))}addCurrentToken(){let e=!1;const t=this.getSelectedSuggestion();return t?(this.addNewToken(t),e=!0):this.inputHasValidValue()&&(this.addNewToken(this.state.incompleteTokenValue),e=!0),e}addNewTokens(e){const t=Object(s.uniq)(e.map(this.props.saveTransform).filter(Boolean).filter((e=>!this.valueContainsToken(e))));if(t.length>0){const e=Object(s.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:n}=this.props;n(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter((t=>this.getTokenValue(t)!==this.getTokenValue(e)));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(e=this.state.incompleteTokenValue,t=this.props.suggestions,n=this.props.value,o=this.props.maxSuggestions,i=this.props.saveTransform){let r=i(e);const a=[],u=[];return 0===r.length?t=Object(s.difference)(t,n):(r=r.toLocaleLowerCase(),Object(s.each)(t,(e=>{const t=e.toLocaleLowerCase().indexOf(r);-1===n.indexOf(e)&&(0===t?a.push(e):t>0&&u.push(e))})),t=a.concat(u)),Object(s.take)(t,o)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return Object(s.some)(this.props.value,(t=>this.getTokenValue(e)===this.getTokenValue(t)))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(e=!0){const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:n}=this.state,o=n.trim().length>1,s=this.getMatchingSuggestions(n),i=s.length>0,r={isExpanded:t||o&&i};if(e&&(r.selectedSuggestionIndex=-1,r.selectedSuggestionScroll=!1),this.setState(r),o){const{debouncedSpeak:e}=this.props;e(i?Object(a.sprintf)(
/* translators: %d: number of results. */
Object(a._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",s.length),s.length):Object(a.__)("No results."),"assertive")}}renderTokensAndInput(){const e=Object(s.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,n){const s=this.getTokenValue(e),i=e.status?e.status:void 0,r=t+1,a=n.length;return Object(o.createElement)(g,{key:"token-"+s,value:s,status:i,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==i&&this.props.disabled,messages:this.props.messages,termsCount:a,termPosition:r})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:n,placeholder:s,value:i,instanceId:r}=this.props;let a={instanceId:r,autoCapitalize:e,autoComplete:t,placeholder:0===i.length?s:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return n&&i.length>=n||(a={...a,onChange:this.onInputChange}),Object(o.createElement)(m.a,a)}render(){const{disabled:e,label:t=Object(a.__)("Add item"),instanceId:n,className:s,__experimentalShowHowTo:i}=this.props,{isExpanded:u}=this.state,c=r()(s,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let l={className:"components-form-token-field",tabIndex:"-1"};const p=this.getMatchingSuggestions();return e||(l=Object.assign({},l,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),Object(o.createElement)("div",l,Object(o.createElement)("label",{htmlFor:`components-form-token-input-${n}`,className:"components-form-token-field__label"},t),Object(o.createElement)("div",{ref:this.bindTokensAndInput,className:c,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),u&&Object(o.createElement)(v.a,{instanceId:n,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:p,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),i&&Object(o.createElement)("p",{id:`components-form-token-suggestions-howto-${n}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?Object(a.__)("Separate with commas, spaces, or the Enter key."):Object(a.__)("Separate with commas or the Enter key.")))}}T.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:s.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:Object(a.__)("Item added."),removed:Object(a.__)("Item removed."),remove:Object(a.__)("Remove item"),__experimentalInvalid:Object(a.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0},t.a=y(Object(u.withInstanceId)(T))},149:function(e,t,n){"use strict";var o=n(0),s=n(10);const i=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(s.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=i},153:function(e,t,n){"use strict";var o=n(0),s=n(10);const i=Object(o.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(s.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=i},4:function(e,t,n){var o;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var r=s.apply(null,o);r&&e.push(r)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var a in o)n.call(o,a)&&o[a]&&e.push(a);else e.push(o.toString())}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(o=function(){return s}.apply(t,[]))||(e.exports=o)}()},44:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var o=n(9);function s(e,t,n){var s=this,i=Object(o.useRef)(null),r=Object(o.useRef)(0),a=Object(o.useRef)(null),u=Object(o.useRef)([]),c=Object(o.useRef)(),l=Object(o.useRef)(),p=Object(o.useRef)(e),d=Object(o.useRef)(!0);Object(o.useEffect)((function(){p.current=e}),[e]);var h=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,m="maxWait"in n,v=m?Math.max(+n.maxWait||0,t):null;Object(o.useEffect)((function(){return d.current=!0,function(){d.current=!1}}),[]);var b=Object(o.useMemo)((function(){var e=function(e){var t=u.current,n=c.current;return u.current=c.current=null,r.current=e,l.current=p.current.apply(n,t)},n=function(e,t){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(e):setTimeout(e,t)},o=function(e){if(!d.current)return!1;var n=e-i.current;return!i.current||n>=t||n<0||m&&e-r.current>=v},b=function(t){return a.current=null,g&&u.current?e(t):(u.current=c.current=null,l.current)},k=function e(){var s=Date.now();if(o(s))return b(s);if(d.current){var a=t-(s-i.current),u=m?Math.min(a,v-(s-r.current)):a;n(e,u)}},y=function(){var p=Date.now(),h=o(p);if(u.current=[].slice.call(arguments),c.current=s,i.current=p,h){if(!a.current&&d.current)return r.current=i.current,n(k,t),f?e(i.current):l.current;if(m)return n(k,t),e(i.current)}return a.current||n(k,t),l.current};return y.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),r.current=0,u.current=i.current=c.current=a.current=null},y.isPending=function(){return!!a.current},y.flush=function(){return a.current?b(Date.now()):l.current},y}),[f,m,t,v,g,h]);return b}function i(e,t){return e===t}function r(e){return"function"==typeof e?function(){return e}:e}function a(e,t,n){var a,u,c=n&&n.equalityFn||i,l=(a=Object(o.useState)(r(e)),u=a[1],[a[0],Object(o.useCallback)((function(e){return u(r(e))}),[])]),p=l[0],d=l[1],h=s(Object(o.useCallback)((function(e){return d(e)}),[d]),t,n),f=Object(o.useRef)(e);return c(f.current,e)||(h(e),f.current=e),[p,h]}},45:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var o=function(e){return function(t,n,o){return e(t,n,o)*o}},s=function(e,t){if(e)throw Error("Invalid sort config: "+t)},i=function(e){var t=e||{},n=t.asc,i=t.desc,r=n?1:-1,a=n||i;return s(!a,"Expected `asc` or `desc` property"),s(n&&i,"Ambiguous object with `asc` and `desc` config properties"),{order:r,sortBy:a,comparer:e.comparer&&o(e.comparer)}};function r(e,t,n){if(void 0===e||!0===e)return function(e,o){return t(e,o,n)};if("string"==typeof e)return s(e.includes("."),"String syntax not allowed for nested properties."),function(o,s){return t(o[e],s[e],n)};if("function"==typeof e)return function(o,s){return t(e(o),e(s),n)};if(Array.isArray(e)){var o=function(e){return function t(n,o,s,r,a,u,c){var l,p;if("string"==typeof n)l=u[n],p=c[n];else{if("function"!=typeof n){var d=i(n);return t(d.sortBy,o,s,d.order,d.comparer||e,u,c)}l=n(u),p=n(c)}var h=a(l,p,r);return(0===h||null==l&&null==p)&&o.length>s?t(o[s],o,s+1,r,a,u,c):h}}(t);return function(s,i){return o(e[0],e,1,n,t,s,i)}}var a=i(e);return r(a.sortBy,a.comparer||t,a.order)}var a=function(e,t,n,o){return Array.isArray(t)?(Array.isArray(n)&&n.length<2&&(n=n[0]),t.sort(r(n,o,e))):t};function u(e){var t=o(e.comparer);return function(n){var o=Array.isArray(n)&&!e.inPlaceSorting?n.slice():n;return{asc:function(e){return a(1,o,e,t)},desc:function(e){return a(-1,o,e,t)},by:function(e){return a(1,o,e,t)}}}}var c=function(e,t,n){return null==e?n:null==t?-n:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},l=u({comparer:c});u({comparer:c,inPlaceSorting:!0})},76:function(e,t,n){"use strict";var o=n(0);t.a=function(e){let{icon:t,size:n=24,...s}=e;return Object(o.cloneElement)(t,{width:n,height:n,...s})}},81:function(e,t,n){"use strict";var o=n(8),s=n(0),i=n(4),r=n.n(i);class a extends s.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:i,className:a,...u}=this.props,c=e?e.length+1:0;return Object(s.createElement)("input",Object(o.a)({ref:this.bindInput,id:`components-form-token-input-${n}`,type:"text"},u,{value:e||"",onChange:this.onChange,size:c,className:r()(a,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${n}`:void 0,"aria-activedescendant":-1!==i?`components-form-token-suggestions-${n}-${i}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${n}`}))}}t.a=a},82:function(e,t,n){"use strict";var o=n(0),s=n(7),i=n(83),r=n.n(i),a=n(4),u=n.n(a),c=n(11);class l extends o.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,r()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}render(){return Object(o.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},Object(s.map)(this.props.suggestions,((e,t)=>{const n=this.computeSuggestionMatch(e),s=u()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return Object(o.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:s,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},n?Object(o.createElement)("span",{"aria-label":this.props.displayTransform(e)},n.suggestionBeforeMatch,Object(o.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):this.props.displayTransform(e))})))}}l.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])},t.a=Object(c.withSafeTimeout)(l)},83:function(e,t,n){"use strict";e.exports=n(115)}}]);